import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'levelView',
      component: () => import('@/views/levelView.vue')
    },
    {
      path: '/1',
      name: 'level_1',
      component: () => import('@/components/Game.vue'),
    },
    {
      path:'/2',
      name:'level_2',
      component:() => import('@/components/GameWithBarrier.vue')
    },
    {
      path:'/3',
      name:'level_3',
      component:() => import('@/components/Game3.vue')
    },
    {
      path:'/4',
      name:'level_4',
      component:() => import('@/components/Game.vue')
    },
    {
      path:'/fail',
      name:'fail',
      component:() => import('@/views/Fail.vue')
    },
    {
      path: '/404',
      component: () => import('@/views/404.vue'),
      name: '404'
    },
    {
      path: '/:pathMatch(.*)*',
      redirect: '/404',
      name: 'Any'
    }
  ],
})

export default router
